#ifndef __SENDTHREAD_H__
#define __SENDTHREAD_H__

class SendThread;

#include <QThread>
#include <QMutex>
#include <QWaitCondition>
#include <QList>
#include "packet.h"
#include "faketcp.h"

class SendThread: public QThread {
public:
	SendThread(FakeTcp * socket, QMutex * packetMutex, QWaitCondition * packetWait, QList<Packet*> * packets);
	~SendThread();

	void run();
	void sendAck();
private:
	FakeTcp * socket;
	QMutex * packetMutex;
	QWaitCondition * packetWait;
	QList<Packet*> * packets;

	QWaitCondition ackWait;
	bool stop;
};

#endif
